The present invention relates to a distance measuring apparatus, such as an inter-vehicle distance measuring apparatus that is used to prevent collisions between vehicles.
A conventional inter-vehicle distance measuring apparatus electrically compares images formed by two lateral optical systems to measure a distance based on the principle of triangulation.
FIG. 6 shows the configuration of a conventional inter-vehicle distance measuring apparatus 50 of this kind, which includes a pair of imaging means 52 for imaging an object 51 to be measured and an arithmetic operation means 53 for calculating the distance to the object 51 based on an image obtained by the imaging means 52.
The imaging means 52 is composed of a pair of image-forming lenses 61, 62 and a pair of optical sensor arrays 63, 64.
The arithmetic operation means 53 is composed of a signal processing section 65 and a distance detection circuit 66.
In FIG. 6, the image-forming lenses 61, 62 are disposed so as to maintain an interval B between their optical axes.
The optical sensor arrays 63, 64 are, for example, CCD linear sensors that are disposed at a focal length (f) from the image-forming lenses 61, 62, respectively.
The optical sensor arrays 63, 64 convert images of the object 51 formed by the image-forming lenses 61, 62 into image signals s61, s62 and output them to the signal processing section 65.
The signal processing section 65 consists of amplifiers 67, 68; A/D converters 69, 70; and a storage device 71.
The image signals s61, s62 from the optical sensor arrays 63, 64 are amplified by the amplifiers 67, 68, converted into digital data by the A/D converters 69, 70, and outputted to the storage device 71 as image data s63, s64.
A distance detection circuit 66 installed on the output side of the signal processing section 65 is composed of a microcomputer to compare the lateral image data s63, s64 stored in the storage device 71 in order to calculate the distance to the measuring object 51. The distance is outputted as a distance signal s65.
The principle of the distance calculation is described below with reference to FIG. 7.
In particular, the midpoint between the optical axes of the image-forming lenses 61, 62 is defined as origin O to set a horizontal axis X and a vertical axis Y. The coordinates of image-forming positions L.sub.1, R.sub.1 are represented as (-a.sub.L1 -B/2, -f) and (a.sub.R1 +B/2, -f), respectively. References a.sub.L1, a.sub.R1 denote distances on the optical sensor arrays 63, 64, respectively, as shown in the drawing.
If the coordinate of the middle point O.sub.L of the image-forming lens 61 is represented as (-B/2, 0), the coordinate of the middle point O.sub.R of the image-forming lens 62 is represented as (B/2, 0); and the coordinate of a point M in the object 51 is represented as (x, y); then the coordinate of an intersection N of a vertical line extending vertically from the point M to the X axis is (x, 0); the coordinate of a position L.sub.0 of a vertical line extending from a point O.sub.L to the optical sensor array 63 is (-B/2, -f); and the coordinate of a position R.sub.0 of a vertical line extending from the point O.sub.R to the optical sensor array 64 is (B/2, -f). Since a triangle MO.sub.L M is similar to a triangle O.sub.L L.sub.1 L.sub.0 and a triangle MO.sub.R N is similar to a triangle O.sub.R R.sub.1 R.sub.0, Equations 1 and 2 are established. EQU (x+B/2)f=a.sub.L1 .multidot.y Equation 1: EQU (-x+B/2)f=a.sub.R1 .multidot.y Equation 2:
Equation 3 can be obtained from Equations 1 and 2.
If the distances a.sub.L1, a.sub.R1 for the image-forming positions L.sub.1, R.sub.1 are determined by using Equation 3, the distance (y) to the object 51 can be calculated. EQU y=B.multidot.f/(a.sub.R1 +a.sub.L1) Equation 3:
Next, the operation of the distance detection circuit 66 is described in detail.
The distance detection circuit 66 compares lateral data 63L, 63R, as shown by the solid lines in FIG. 8, for a separately set distance measuring range 73 (see FIG. 9); and if the images do not match, for example, it sequentially shifts the left image 63L to the right while shifting the right image 64R to the left, as shown by the broken lines in the figure, in order to detect the amount of shift (a.sub.R1 +a.sub.L1) required to place them in a condition where they most nearly match.
The right and left data do not always match perfectly because there may be image matching points located within the spatial pixels of the optical sensor arrays 63, 64.
Based on the amount of shift (a.sub.R1 +a.sub.L1), the detection circuit 66 calculates the distance (y) to the object 51 by using Equation 3.
FIG. 9 is a schematic drawing showing a normal image obtained when the inter-vehicle distance to a preceding vehicle 51a is detected.
In this figure, the distance-measuring range 73 is set within a measuring visual field 72, and the distance to an object, that is, the preceding vehicle 51a within the distance measuring range 73, is detected as an inter-vehicle distance based on the principle of the distance detection.
By installing the inter-vehicle distance measuring apparatus 50 inside the vehicle, certain benefits can be obtained including the elimination of need to make this apparatus resistant to dust or water, and the use of a wiper on a rainy day.
FIG. 10 is a schematic sketch showing the inter-vehicle distance measuring device 50 installed between an interior mirror 74 inside the vehicle and a windshield 75.
The inter-vehicle distance measuring apparatus 50 is fixed to the interior mirror 74 via a direction adjustment fixture 76.
FIG. 11 shows one example of an angle adjustment mechanism for the inter-vehicle distance measuring device 50.
The angle adjustment mechanism is composed of the direction adjustment fixture 76, a parallel pin 77, a fixing bolt 78, and an eccentric driver 79.
The direction adjustment fixture 76 is fixed to a part of the interior mirror (not shown). The angle of the inter-vehicle distance measuring device 50 is adjusted as follows.
The fixing bolt 78 is loosened to rotate the eccentric driver 79. At this point, the inter-vehicle distance measuring apparatus 50 fixed to the direction adjustment fixture 76 can be rotated around the parallel pin 77. The eccentric driver 79 is rotated to adjust the angle (direction) of the inter-vehicle distance measuring apparatus 50, and the fixing bolt 78 is then tightened.
The installation of the inter-vehicle distance measuring apparatus 50 inside the vehicle yields many advantages described above, but also creates inconveniences as described below.
The windshield 75 present between the measuring apparatus 50 and the measuring object 51 causes an error in the distance signal s65, thereby degrading the measuring accuracy of the inter-vehicle distance measuring apparatus 50.
The effects of the windshield 75 include, its non-uniform thickness, the difference in the incident angle of light incident on the image-forming lenses 61, 62, and different refractive indices at different positions of the windshield 75.
FIG. 12 shows the effect of the non-uniform thickness of the windshield 75 on the distance measuring accuracy.
For convenience of explanation, in FIG. 12, light beams from infinite points that are parallel to the optical axis of the image-forming lens 61 are transmitted through the windshield 75 with a non-uniform thickness, and enter the imaging means 52 comprising the image-forming lens 61 and the optical sensor array 63. The surface of the windshield 75 (first surface) is assumed to be inclined at an angle .alpha..sub.L from the optical axis of the image-forming lens 61, while the rear surface of the windshield 75 is assumed to be perpendicular to this optical axis.
Light beams from the infinite points that are parallel to the optical axis are refracted on the first and the second surfaces of the windshield 75 and inclined at an angle .theta..sub.L from the optical axis, the angle being given by Equation 4. EQU .theta..sub.L .apprxeq.(n-1).alpha..sub.L Equation 4:
In this equation, (n) indicates the refractive index of the windshield 75 relative to the wavelength of incident light.
Thus, the position of an image-forming point on the optical sensor array 63 is offset by .increment.a.sub.L1, which is given by Equation 5, from the image-forming position (as shown by the dotted line) obtained if the windshield 75 does not exist. EQU .increment.a.sub.L1 =.theta..sub.L .multidot.f Equation 5:
In this equation, (f) designates the focal length of the image-forming lens 61.
One of the image-forming lenses 61 and one of the optical sensor arrays 63 constituting the imaging means 52 have been described, but the same is applicable to the other image-forming lens 62 and the other optical sensor array 64.
A light beam transmitted through the windshield 75 is assumed to be inclined at an angle .theta..sub.R from the optical axis of the image-forming lens 62 and the offset of the image-forming position of this beam on the optical sensor array 64 (from the image-forming position obtained if the windshield does not exist) is represented as .increment.a.sub.R1.
As is apparent from FIG. 10, the inclination of the normal of each surface of the windshield from incident beams is relatively large as compared to FIG. 12.
In addition, since the two image-forming lenses 61 and 62 are separated at a distance B, light beams incident on each image-forming lens are transmitted through different positions 80, 81, i.e. light beam passing portions, of the windshield 75. Consequently, the thickness of the windshield 75 and the angle between each incident light and the normal of the windshield are different between the positions 80, 81.
As a result, .increment.a.sub.L1 and .increment.a.sub.R1 have different values and .theta..sub.L and .theta..sub.R have different values.
The difference between the offsets of the image-forming positions (.increment.a.sub.L1 and .increment.a.sub.R1) is given by Equation 6. EQU .increment.a=.increment.a.sub.L1 -.increment.a.sub.R1 =f(.theta..sub.L -.theta..sub.R) Equation 6:
The value of .increment.a given by Equation 6 is an error in the amount of shift and thus an error in the distance signal s65.
This invention thus provides a distance measuring apparatus with a high degree of distance measuring accuracy that can correct errors in distance measurements caused by a medium, such as a windshield present between the distance measuring apparatus and an object to be measured.